package com.ehome.poct.base.controller.account;

import com.ehome.poct.base.api.dto.account.TermAgentOrgDTO;
import com.ehome.poct.base.api.virtual.TermAgentOrgService;
import com.ehome.poct.base.api.vo.account.TermAgentOrgVO;
import com.ehome.web.controller.AbstractBaseController;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther: kuiba.peng
 * @date: 2022/11/18 11:22
 * @description:
 */
@RestController
@RequestMapping("/termAgentOrg")
@RequiredArgsConstructor
public class TermAgentOrgController extends AbstractBaseController<TermAgentOrgVO, TermAgentOrgDTO> {

    private final TermAgentOrgService termAgentOrgService;


    @GetMapping("/getByAgentId/{agentId}")
    public TermAgentOrgDTO getByClinicId(@PathVariable Long agentId) {
        TermAgentOrgDTO termAgentOrgDTO = new TermAgentOrgDTO();
        termAgentOrgDTO.setId(agentId);
        return termAgentOrgService.selectOne(termAgentOrgDTO);
    }
}
